package com.leyou.exception;


import com.leyou.ExceptionEnum.ExceptionEnum;
import lombok.Getter;

@Getter
public class LyException extends RuntimeException {

    private int status;

    public LyException(int status,String message) {
        super(message);
        this.status = status;
    }

    public LyException(int status,String message, Throwable cause) {
        super(message, cause);
        this.status = status;
    }

    public LyException(ExceptionEnum em) {
        super(em.getMessage());
        status = em.getStatus();
    }
    public LyException(ExceptionEnum em,Throwable cause) {
        super(em.getMessage(), cause);
        status = em.getStatus();
    }

}
